package com.xyw.code.gateway.web;

import com.alicp.jetcache.anno.config.EnableCreateCacheAnnotation;
import com.alicp.jetcache.anno.config.EnableMethodCache;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.circuitbreaker.EnableCircuitBreaker;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.annotation.ComponentScan;

@SpringBootApplication
@ComponentScan(basePackages = {"com.xyw.code.gateway"
        ,"com.xyw.code.authentication"})
@EnableDiscoveryClient
@EnableFeignClients(basePackages = {"com.xyw.code.gateway"
        ,"com.xyw.code.authentication"})
@EnableCircuitBreaker//断路器注解
@EnableMethodCache(basePackages = "com.xyw.code") //激活@Cached
@EnableCreateCacheAnnotation  //激活@CreateCache
public class GatewayWebApplication {
    public static void main(String[] args) {
        SpringApplication.run(GatewayWebApplication.class, args);
    }

}
